﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.SignalR;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace WebApplication_SignalRDemo
{
    public class SignalRSendMiddle
    {
        private readonly RequestDelegate _next;
        private readonly IHubContext<ChatHub> _hubContext;

        public SignalRSendMiddle (RequestDelegate next,IHubContext<ChatHub> hubContext)
        {
            _next = next;
            _hubContext = hubContext;
        }

        public async Task  InvokeAsync(HttpContext context)
        {
            await _next(context);
        }
    }
}
